package com.wash.shoes.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wash.shoes.entity.ShopGoodsPo;
import com.wash.shoes.entity.ShopGoodsTypePo;
import com.wash.shoes.mapper.ShopGoodsTypeMapper;
import com.wash.shoes.page.PageFactory;
import com.wash.shoes.service.ShopGoodsTypeService;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 * 商品的分类 服务实现类
 * </p>
 *
 * @author ljg
 * @since 2024-12-01
 */
@Service
public class ShopGoodsTypeServiceImpl extends ServiceImpl<ShopGoodsTypeMapper, ShopGoodsTypePo> implements ShopGoodsTypeService {


    /**
     * 分叶查询数据
     *
     * @param shopGoodsTypePo
     * @return
     */
    @Override
    public Page<ShopGoodsTypePo> pageList(ShopGoodsTypePo shopGoodsTypePo) {

        Page page = PageFactory.defaultPage();
        List<ShopGoodsTypePo> dataList = baseMapper.pageList(page, shopGoodsTypePo);
        page.setRecords(dataList);
        return page;
    }

    /**
     * 获取 商品类型
     * @return
     */
    @Override
    public List<ShopGoodsTypePo> shopGoodsTypeList() {

        return this.baseMapper.shopGoodsTypeList();
    }
}
